//点击登录显示登录框
//找到登录按钮
var dengl = document.querySelector('.denglu')

//绑定点击事件并显示登录框
dengl.onclick = function(){
    var loginkuang = document.querySelector('.login')
    loginkuang.style.visibility = 'visible'
}
//绑定点击事件隐藏登录框
var closedengl = document.querySelector('.close')
closedengl.onclick = function(){
    var loginkuang = document.querySelector('.login')
    loginkuang.style.visibility = 'hidden'
}
//拖拽效果
var loginkuang = document.querySelector('.item')
    loginkuang.onmousedown = function(evt){
        document.onmousemove = function(evt){   
            var e =evt || window.event
            loginkuang.style.position = 'absolute'
            loginkuang.style.left = e.pageX-200+'px'
            loginkuang.style.top = e.pageY-30+'px'   
        }
        loginkuang.onmouseup= function(evt){
            document.onmousemove = null
        }
}
//点击登录验证
//获取登录注册
var dlButton = document.querySelector('.submit')
dlButton.onclick = function(){
    var phone = document.querySelector('.mobile')
    if(phone.value == ''){
        var msg1 = document.querySelector('.msg').innerHTML = '请输入手机号'
        console.log(msg1)
        if(msg1 != Number){
            document.querySelector('.msg').innerHTML = '请输入数字'
        }else{
            document.querySelector('.msg').innerHTML = ''
        }
    }

}

    

   